home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 11372 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  839 b 

  1. Path: bowtech.erinet.com!jab
  2. From: jab@erinet.com (Jerone A. Bowers)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Rand() Function
  5. Date: 23 Mar 1996 15:02:46 GMT
  6. Organization: BowTech.
  7. Message-ID: <4j13qm$a6c@news.erinet.com>
  8. References: <4iqltj$40g@news1.sympatico.ca>
  9. NNTP-Posting-Host: bowtech.erinet.com
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. Gisele Swinson (gisele.swinson@sympatico.ca) wrote:
  13. : How do I get a random number from a "SET" of numbers.
  14.  
  15. : e.g.
  16.  
  17. :       I want a random number from this set:
  18.  
  19. :       2, 4, 6, 8, 10
  20.  
  21.  
  22.     Perhaps all you need is a random number from 0 to (number_of_
  23. items_in_set -1). In this case 5 items.
  24.  
  25.  
  26. --
  27. These thoughts are mine and mine alone.    I can say that, right?
  28.  
  29. EMAIL: jab@bowtech.erinet.com         |  Knowledge is but one
  30. SMAIL  9221 N Main St            |  step on the path to
  31. Dayton, OH 45415-1126            |  wisdom.
  32.  
  33.